<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      /* .testDiv {
        background-color: red;
        width: 200px;
        height: 200px;
        position: relative;
        left: 10px;
        transition: left 0.9s cubic-bezier(0.6, 0, 0.4, 1),
          right 0.9s cubic-bezier(0.6, 0, 0.4, 1);
      } */
      .div1 {
        width: 100px;
        height: 100px;
        float: left;
        background-color: aqua;
      }
      .div2 {
        width: 200px;
        height: 200px;
        /* position: fixed; */
        background-color: blanchedalmond;
      }
      .div3 {
        width: 150px;
        height: 150px;
        background-color: blue;
      }
      .font {
        background-color: aquamarine;
      }
    </style>
  </head>
  <body>
    <div class="div1"></div>
    <div class="div2">
      <!-- <div class="div3"></div> -->
      <div class="font">122222333333</div>
    </div>
    <!-- <div class="testDiv" id="demo"></div>
    <button onclick="test()">按钮</button> -->

    <script>
      var demo = document.getElementById("demo");
      function test() {
        // demo.style.display = "none";
        demo.style.left = "-100%";
      }
    </script>
  </body>
</html>
